package com.shasselclub.api.v1.result;
import com.shasselclub.api.weixin.WxWebPageUserinfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author zhuangxl
 * @description
 * @since 2021-03-04 12:40
 */
@Data
public class WeiXinUserResult implements java.io.Serializable{


    @ApiModelProperty(value = "微信openid")
    private String openId;
    @ApiModelProperty(value = "微信昵称")
    private String nickName;
    @ApiModelProperty(value = "微信头像")
    private String headImgUrl;
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getHeadImgUrl() {
        return headImgUrl;
    }

    public void setHeadImgUrl(String headImgUrl) {
        this.headImgUrl = headImgUrl;
    }
    public static  WeiXinUserResult boToResult(WxWebPageUserinfo bo){
        WeiXinUserResult weiXinUserResult=new WeiXinUserResult();
        weiXinUserResult.setOpenId(bo.getOpenid());
        weiXinUserResult.setHeadImgUrl(bo.getHeadimgurl());
        weiXinUserResult.setNickName(bo.getNickname());
        return weiXinUserResult;
    }
}
